package com.SunSoft.PhoneRemoteControl;

import android.app.Dialog;
import android.content.Context;
import android.content.res.Resources;
import android.util.AttributeSet;
import android.util.DisplayMetrics;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup.LayoutParams;
import android.widget.AdapterView.OnItemClickListener;
import android.widget.ListView;
import android.widget.Spinner;
import java.util.ArrayList;

public class CustomerSpinner extends Spinner
{
  public Context a;
  AdapterView.OnItemClickListener b = new a(this);
  private Dialog c = null;
  private ArrayList d;
  private String e;

  public CustomerSpinner(Context paramContext)
  {
    super(paramContext);
  }

  public CustomerSpinner(Context paramContext, AttributeSet paramAttributeSet)
  {
    super(paramContext, paramAttributeSet);
    this.a = getContext();
    if (isInEditMode())
      return;
    setAdapter(new b(this));
  }

  public final void a(String paramString)
  {
    this.e = paramString;
  }

  public final void a(ArrayList paramArrayList)
  {
    this.d = paramArrayList;
  }

  public boolean performClick()
  {
    View localView = LayoutInflater.from(getContext()).inflate(2130903056, null);
    Object localObject = (ListView)localView.findViewById(2131165347);
    ((ListView)localObject).setAdapter(new c(this, this.a, this.d));
    ((ListView)localObject).setOnItemClickListener(this.b);
    this.c = new Dialog(this.a, 2131034156);
    localObject = new ViewGroup.LayoutParams((int)(this.a.getResources().getDisplayMetrics().density * 280.0F + 0.5F), -2);
    this.c.setCanceledOnTouchOutside(true);
    this.c.show();
    this.c.addContentView(localView, (ViewGroup.LayoutParams)localObject);
    return true;
  }
}